package com.changzhi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.changzhi.ldyl.model.ActivityWallet;
import com.changzhi.ldyl.model.vo.UserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 活动钱包表 Mapper 接口
 * </p>
 *
 * @author huangrc
 * @since 2020-12-28
 */
public interface ActivityWalletMapper extends BaseMapper<ActivityWallet> {

	int addAmount1(@Param("id") Integer id, @Param("value") Integer value);

	int reduceAmount1(@Param("id") Integer id, @Param("value") Integer value);

	int reduceAmount2(@Param("id") Integer id, @Param("value") Integer value);

	int reduceAmount3(@Param("id") Integer id, @Param("value") Integer value);

	int addAmount2(@Param("id") Integer id, @Param("value") Integer value);

	int addAmount3(@Param("id") Integer id, @Param("value") Integer value);

	int addAmount1AndAmount3(@Param("id") Integer id, @Param("value1") Integer value1, @Param("value3") Integer value3);

	Page<UserVo> selectLoveRankings(Page<?> page, @Param("activityId") Integer activityId, @Param("type") Integer type);

	int addNum(@Param("id") Integer id, @Param("value") Integer value);

	//女神节排行榜
	List<UserVo> selectRankings(@Param("activityId") Integer activityId);

	List<UserVo> selectValue1Rankings(@Param("activityId") Integer activityId, @Param("limit") Integer limit);

	List<UserVo> selectValue2Rankings(@Param("activityId") Integer activityId, @Param("limit") Integer limit);

	int addAmount2AndOther(@Param("id") Integer id, @Param("value")  Integer value, @Param("property1")  String property1);

	ActivityWallet getWalletByUserId(@Param("activityId") Integer activityId, @Param("userId") String userId);
}
